/*
 * @Author: lmk
 * @Date: 2022-04-18 22:43:00
 * @LastEditTime: 2022-04-18 22:49:35
 * @LastEditors: lmk
 * @Description: 
 */

import { computed } from "vue";
import { useIsZh } from "./useIsZh";

export function useElementText(zh,en){
  const {isZh} = useIsZh()
  const div = document.createElement('div');
  const innerText = computed(() => {
    const content = isZh ? zh : en
    div.innerHTML = content;
    return div.innerText
  });
  return innerText
}